interface LoginAPIResData {
  code: number
  data: {
    userinfo: UserInfo
  }
  msg: string
  time: string
}

interface LoginAPIData {
  code: string
  iv: string
  encryptedData: string
  login_type: 'wechat'
  pid?: string
}

export function loginAPI(data: LoginAPIData) {
  return httpInstance.post<LoginAPIResData, LoginAPIData>(
    '/api/user/login',
    data,
  )
}
